<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>九铭资产管理-登录</title>
		<link rel="stylesheet" href="/Public/Home/css/jiuming.css" />
		<link rel="shortcut icon" href="http://jlzpublicbucket.oss-cn-hangzhou.aliyuncs.com/assets/jiujming.ico" type="image/x-icon">
	</head>
	<body style="background: url(http://jlzpublicbucket.oss-cn-hangzhou.aliyuncs.com/assets/login_bg.jpg) no-repeat; position: relative;">
		<div class="login-wrap">
			<div class="login-top-img">
				<img src="http://jlzpublicbucket.oss-cn-hangzhou.aliyuncs.com/assets/login_top_img.png" />
			</div>
			<div class="login-input">
				<input type="text" class="input" value="" id="tel" placeholder="请输入手机号" />
			</div>
			<div class="login-input">
				<input type="password" class="input" value="" id="pwd" placeholder="请输入密码" />
			</div>
			<!--<div class="login-input">
				<input type="text" class="input" value="" id="code" placeholder="请输入验证码，点击图片可更换" />
				<img src="img/code.png" class="img-code" id="img-code" title="点击换一张"/>
			</div>-->
			<div class="btn login" id="login">登&nbsp;&nbsp;录</div>
			<p class="login-p"><a class="forget-pwd" href="{:U('Index/password_back',array('token' => 'dvaglg1469847559'))}">忘记密码？</a><a class="register" href="{:U('Index/register',array('token' => 'dvaglg1469847559'))}">账号注册</a></p>
		</div>
		
		<script type="text/javascript" src="/Public/Home/js/jquery.1.9.1.min.js"></script>
		<script>
			$(function(){
				function login(){
					var tel = $("#tel").val();
					var password = $("#pwd").val();
					if(tel == ''){
    				alert("请输入手机号");
    				$("#tel").focus();
    				return false;
    			}
					if(password == ''){
    				alert("请输入密码");
    				$("#pwd").focus();
    				return false;
    		}
					$.ajax({
						ulr:"{:U('index/login',array('token' => 'dvaglg1469847559'))}",
						type:"POST",
						dataType:"json",
						data:{
							tel:tel,
							password:password
						},
						success:function(data){
							if(data.status == 1){
								if(data.isinvestigation == 0){
									window.location.href="{:U('Assets/investigation_index',array('token' => 'dvaglg1469847559'))}";
								}else{
									window.location.href="{:U('Assets/index',array('token' => 'dvaglg1469847559'))}";
								}
							}else{
								alert(data.msg);
							}
						}
					})
				}
				$("#login").click(function(){
					login();
				})
				$("#pwd").bind('keyup',function(){
					if(event.keyCode == '13'){
						login();
					}
				})
			})
		</script>
	</body>
</html>
